Integrand size = 16, antiderivative size = 93 \[ \int (c+d x) (a+b \sec (e+f x)) \, dx=\frac {a (c+d x)^2}{2 d}-\frac {2 i b (c+d x) \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {i b d \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {i b d \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4275, 4266, 2317, 2438} \[ \int (c+d x) (a+b \sec (e+f x)) \, dx=\frac {a (c+d x)^2}{2 d}-\frac {2 i b (c+d x) \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {i b d \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {i b d \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2} \]
[In]
[Out]
Rule 2317
Rule 2438
Rule 4266
Rule 4275
Rubi steps \begin{align*} \text {integral}& = \int (a (c+d x)+b (c+d x) \sec (e+f x)) \, dx \\ & = \frac {a (c+d x)^2}{2 d}+b \int (c+d x) \sec (e+f x) \, dx \\ & = \frac {a (c+d x)^2}{2 d}-\frac {2 i b (c+d x) \arctan \left (e^{i (e+f x)}\right )}{f}-\frac {(b d) \int \log \left (1-i e^{i (e+f x)}\right ) \, dx}{f}+\frac {(b d) \int \log \left (1+i e^{i (e+f x)}\right ) \, dx}{f} \\ & = \frac {a (c+d x)^2}{2 d}-\frac {2 i b (c+d x) \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {(i b d) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i (e+f x)}\right )}{f^2}-\frac {(i b d) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i (e+f x)}\right )}{f^2} \\ & = \frac {a (c+d x)^2}{2 d}-\frac {2 i b (c+d x) \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {i b d \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {i b d \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2} \\ \end{align*}
Time = 0.01 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.12 \[ \int (c+d x) (a+b \sec (e+f x)) \, dx=a c x+\frac {1}{2} a d x^2-\frac {2 i b d x \arctan \left (e^{i e+i f x}\right )}{f}+\frac {b c \text {arctanh}(\sin (e+f x))}{f}+\frac {i b d \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {i b d \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2} \]
[In]
[Out]
Time = 0.30 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.53
method | result | size |
parts | \(a \left (\frac {1}{2} d \,x^{2}+x c \right )+\frac {b \left (\frac {d \left (-\left (f x +e \right ) \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )+\left (f x +e \right ) \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )+i \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )-i \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )\right )}{f}+c \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )-\frac {e d \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}\right )}{f}\) | \(142\) |
derivativedivides | \(\frac {a c \left (f x +e \right )-\frac {a d e \left (f x +e \right )}{f}+\frac {a d \left (f x +e \right )^{2}}{2 f}+b c \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )-\frac {b d e \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}+\frac {b d \left (-\left (f x +e \right ) \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )+\left (f x +e \right ) \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )+i \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )-i \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )\right )}{f}}{f}\) | \(166\) |
default | \(\frac {a c \left (f x +e \right )-\frac {a d e \left (f x +e \right )}{f}+\frac {a d \left (f x +e \right )^{2}}{2 f}+b c \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )-\frac {b d e \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}+\frac {b d \left (-\left (f x +e \right ) \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )+\left (f x +e \right ) \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )+i \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )-i \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )\right )}{f}}{f}\) | \(166\) |
risch | \(\frac {a d \,x^{2}}{2}+a x c -\frac {2 i b c \arctan \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f}-\frac {b d \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}-\frac {b d \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}+\frac {b d \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}+\frac {b d \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}+\frac {i b d \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}-\frac {i b d \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+\frac {2 i b d e \arctan \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}\) | \(186\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 343 vs. \(2 (73) = 146\).
Time = 0.27 (sec) , antiderivative size = 343, normalized size of antiderivative = 3.69 \[ \int (c+d x) (a+b \sec (e+f x)) \, dx=\frac {a d f^{2} x^{2} + 2 \, a c f^{2} x - i \, b d {\rm Li}_2\left (i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right )\right ) - i \, b d {\rm Li}_2\left (i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right ) + i \, b d {\rm Li}_2\left (-i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right )\right ) + i \, b d {\rm Li}_2\left (-i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right ) - {\left (b d e - b c f\right )} \log \left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + i\right ) + {\left (b d e - b c f\right )} \log \left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + i\right ) + {\left (b d f x + b d e\right )} \log \left (i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right ) - {\left (b d f x + b d e\right )} \log \left (i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right ) + {\left (b d f x + b d e\right )} \log \left (-i \, \cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right ) - {\left (b d f x + b d e\right )} \log \left (-i \, \cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right ) - {\left (b d e - b c f\right )} \log \left (-\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + i\right ) + {\left (b d e - b c f\right )} \log \left (-\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + i\right )}{2 \, f^{2}} \]
[In]
[Out]
\[ \int (c+d x) (a+b \sec (e+f x)) \, dx=\int \left (a + b \sec {\left (e + f x \right )}\right ) \left (c + d x\right )\, dx \]
[In]
[Out]
\[ \int (c+d x) (a+b \sec (e+f x)) \, dx=\int { {\left (d x + c\right )} {\left (b \sec \left (f x + e\right ) + a\right )} \,d x } \]
[In]
[Out]
\[ \int (c+d x) (a+b \sec (e+f x)) \, dx=\int { {\left (d x + c\right )} {\left (b \sec \left (f x + e\right ) + a\right )} \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x) (a+b \sec (e+f x)) \, dx=\int \left (a+\frac {b}{\cos \left (e+f\,x\right )}\right )\,\left (c+d\,x\right ) \,d x \]
[In]
[Out]